package com.ncr.travel.tas.configuration.service.messaging;

import java.util.List;

import org.springframework.integration.annotation.Gateway;

import com.ncr.travel.tas.configuration.model.ConfigurationNode;
import com.ncr.travel.tas.configuration.model.ConfigurationValue;
import com.ncr.travel.tas.shared.configuration.ConfigurationServiceException;

public interface ConfigurationService {

	@Gateway(requestChannel = "requestAllConfigurationsChannel", replyChannel = "responseAllConfigurationsChannel")
	List<ConfigurationNode> getAllConfigurations(long nodeId) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestConfigurationChannel", replyChannel = "responseConfigurationChannel")
	ConfigurationNode getConfiguration(long nodeId) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestAddConfigurationChannel", replyChannel = "responseAddConfigurationChannel")
	long addConfiguration(ConfigurationNode node) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestDeleteConfigurationChannel", replyChannel = "responseDeleteConfigurationChannel")
	boolean deleteConfiguration(ConfigurationNode node) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestDeactivateConfigurationChannel", replyChannel = "responseDeactivateConfigurationChannel")
	boolean deactivateConfiguration(ConfigurationNode node) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestFindConfigurationChannel", replyChannel = "responseFindConfigurationChannel")
	List<ConfigurationNode> findConfiguration(ConfigurationNodeCriteria criteria) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestFindConfigurationValueChannel", replyChannel = "responseFindConfigurationValueChannel")
	public List<ConfigurationValue> findConfigurationValue(ConfigurationValueCriteria criteria) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestUpdateConfigurationValueChannel", replyChannel = "responseUpdateConfigurationValueChannel")
	public boolean updateConfigurationValue(ConfigurationValue configuration) throws ConfigurationServiceException;

	@Gateway(requestChannel = "requestGetConfigurationValueChannel", replyChannel = "responseGetConfigurationValueChannel")
	ConfigurationValue getConfigurationValue(long valueId) throws ConfigurationServiceException;

}
